<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>执行一个全局正则表达式匹配</title>
 </head>
 <body class="docs"><div id="layout">
  <div id="layout-content"><div id="function.preg-match-all" class="refentry">

 <div class="refnamediv">
  <h1 class="refname">preg_match_all</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">preg_match_all</span> &mdash; <span class="dc-title">执行一个全局正则表达式匹配</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.preg-match-all-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>preg_match_all</strong></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$pattern</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$subject</code></span>
   [, <span class="methodparam"><span class="type">array</span> <code class="parameter reference">&$matches</code></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$flags</code><span class="initializer"> = <strong><code>PREG_PATTERN_ORDER</code></strong></span></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$offset</code><span class="initializer"> = 0</span></span>
  ]]] ) : <span class="type">int</span></div>

  <p class="para rdfs-comment">
  搜索<code class="parameter">subject</code>中所有匹配<code class="parameter">pattern</code>给定正则表达式
  的匹配结果并且将它们以<code class="parameter">flag</code>指定顺序输出到<code class="parameter">matches</code>中.
  </p>
  <p class="para">
  在第一个匹配找到后, 子序列继续从最后一次匹配位置搜索.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.preg-match-all-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<code class="parameter">pattern</code></dt>

     <dd>

      <p class="para">
       要搜索的模式，字符串形式。
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">subject</code></dt>

     <dd>

      <p class="para">
       输入字符串。
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">matches</code></dt>

     <dd>

      <p class="para">
      多维数组，作为输出参数输出所有匹配结果, 数组排序通过<code class="parameter">flags</code>指定。
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">flags</code></dt>

     <dd>

      <p class="para">
      可以结合下面标记使用(注意不能同时使用<strong><code>PREG_PATTERN_ORDER</code></strong>和
      <strong><code>PREG_SET_ORDER</code></strong>)：
       <dl>

        
         <dt>
<strong><code>PREG_PATTERN_ORDER</code></strong></dt>

         <dd>

          <p class="para">
          结果排序为<var class="varname"><var class="varname">$matches[0]</var></var>保存完整模式的所有匹配, <var class="varname"><var class="varname">$matches[1]</var></var>
          保存第一个子组的所有匹配，以此类推。
          </p>
          <p class="para">
           <div class="informalexample">
            <div class="example-contents">
<div class="phpcode"><pre><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />preg_match_all</span><span style="color: #007700">(</span><span style="color: #DD0000">"|&lt;[^&gt;]+&gt;(.*)&lt;/[^&gt;]+&gt;|U"</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">"&lt;b&gt;example:&nbsp;&lt;/b&gt;&lt;div&nbsp;align=left&gt;this&nbsp;is&nbsp;a&nbsp;test&lt;/div&gt;"</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$out</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">PREG_PATTERN_ORDER</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #0000BB">$out</span><span style="color: #007700">[</span><span style="color: #0000BB">0</span><span style="color: #007700">][</span><span style="color: #0000BB">0</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">",&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">$out</span><span style="color: #007700">[</span><span style="color: #0000BB">0</span><span style="color: #007700">][</span><span style="color: #0000BB">1</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />echo&nbsp;</span><span style="color: #0000BB">$out</span><span style="color: #007700">[</span><span style="color: #0000BB">1</span><span style="color: #007700">][</span><span style="color: #0000BB">0</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">",&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">$out</span><span style="color: #007700">[</span><span style="color: #0000BB">1</span><span style="color: #007700">][</span><span style="color: #0000BB">1</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</pre></div>
            </div>

            <p class="para">以上例程会输出：</p>
            <div class="example-contents screen">
<div class="cdata"><pre>
&lt;b&gt;example: &lt;/b&gt;, &lt;div align=left&gt;this is a test&lt;/div&gt;
example: , this is a test
</pre></div>
            </div>
            <p class="para">
             因此, <var class="varname"><var class="varname">$out[0]</var></var>是包含匹配完整模式的字符串的数组， 
     <var class="varname"><var class="varname">$out[1]</var></var>是包含闭合标签内的字符串的数组。
            </p>
           </div>
          </p>
          <p class="para">
           如果正则表达式包含了带名称的子组，<var class="varname"><var class="varname">$matches</var></var> 额外包含了带名称子组的键。
          </p>
          <p class="para">
           如果正则表达式里，子组名称重名了，则仅最右侧的自组储存在 <var class="varname"><var class="varname">$matches[NAME]</var></var> 中。
           <div class="informalexample">
            <div class="example-contents">
<div class="phpcode"><pre><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />preg_match_all</span><span style="color: #007700">(<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">'/(?J)(?&lt;match&gt;foo)|(?&lt;match&gt;bar)/'</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">'foo&nbsp;bar'</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$matches</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">PREG_PATTERN_ORDER<br /></span><span style="color: #007700">);<br /></span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">$matches</span><span style="color: #007700">[</span><span style="color: #DD0000">'match'</span><span style="color: #007700">]);<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</pre></div>
            </div>

            <p class="para">以上例程会输出：</p>
            <div class="example-contents screen">
<div class="cdata"><pre>
Array
(
    [0] =&gt; 
    [1] =&gt; bar
)
</pre></div>
            </div>
           </div>
          </p>
         </dd>

        
        
         <dt>
<strong><code>PREG_SET_ORDER</code></strong></dt>

         <dd>

          <p class="para">
          结果排序为<var class="varname"><var class="varname">$matches[0]</var></var>包含第一次匹配得到的所有匹配(包含子组)，
          <var class="varname"><var class="varname">$matches[1]</var></var>是包含第二次匹配到的所有匹配(包含子组)的数组，以此类推。
           <div class="informalexample">
            <div class="example-contents">
<div class="phpcode"><pre><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />preg_match_all</span><span style="color: #007700">(</span><span style="color: #DD0000">"|&lt;[^&gt;]+&gt;(.*)&lt;/[^&gt;]+&gt;|U"</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">"&lt;b&gt;example:&nbsp;&lt;/b&gt;&lt;div&nbsp;align=\"left\"&gt;this&nbsp;is&nbsp;a&nbsp;test&lt;/div&gt;"</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$out</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">PREG_SET_ORDER</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #0000BB">$out</span><span style="color: #007700">[</span><span style="color: #0000BB">0</span><span style="color: #007700">][</span><span style="color: #0000BB">0</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">",&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">$out</span><span style="color: #007700">[</span><span style="color: #0000BB">0</span><span style="color: #007700">][</span><span style="color: #0000BB">1</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />echo&nbsp;</span><span style="color: #0000BB">$out</span><span style="color: #007700">[</span><span style="color: #0000BB">1</span><span style="color: #007700">][</span><span style="color: #0000BB">0</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">",&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">$out</span><span style="color: #007700">[</span><span style="color: #0000BB">1</span><span style="color: #007700">][</span><span style="color: #0000BB">1</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</pre></div>
            </div>

            <p class="para">以上例程会输出：</p>
            <div class="example-contents screen">
<div class="cdata"><pre>
&lt;b&gt;example: &lt;/b&gt;, example:
&lt;div align=&quot;left&quot;&gt;this is a test&lt;/div&gt;, this is a test
</pre></div>
            </div>
           </div>
          </p>
         </dd>

        
        
         <dt>
<strong><code>PREG_OFFSET_CAPTURE</code></strong></dt>

         <dd>

          <p class="para">
          如果这个标记被传递，每个发现的匹配返回时会增加它相对目标字符串的偏移量。
          注意这会改变<code class="parameter">matches</code>中的每一个匹配结果字符串元素，使其
          成为一个第<em>0</em>个元素为匹配结果字符串，第<em>1</em>个元素为
          匹配结果字符串在<code class="parameter">subject</code>中的偏移量。
           
           <div class="informalexample">
            <div class="example-contents">
<div class="phpcode"><pre><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />preg_match_all</span><span style="color: #007700">(</span><span style="color: #DD0000">'/(foo)(bar)(baz)/'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'foobarbaz'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$matches</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">PREG_OFFSET_CAPTURE</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">$matches</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</pre></div>
            </div>

            <p class="para">以上例程会输出：</p>
            <div class="example-contents screen">
<div class="cdata"><pre>
Array
(
    [0] =&gt; Array
        (
            [0] =&gt; Array
                (
                    [0] =&gt; foobarbaz
                    [1] =&gt; 0
                )

        )

    [1] =&gt; Array
        (
            [0] =&gt; Array
                (
                    [0] =&gt; foo
                    [1] =&gt; 0
                )

        )

    [2] =&gt; Array
        (
            [0] =&gt; Array
                (
                    [0] =&gt; bar
                    [1] =&gt; 3
                )

        )

    [3] =&gt; Array
        (
            [0] =&gt; Array
                (
                    [0] =&gt; baz
                    [1] =&gt; 6
                )

        )

)
</pre></div>
            </div>
           </div>
          </p>
         </dd>

        
       </dl>

      </p>
      <p class="para">
      如果没有给定排序标记，假定设置为<strong><code>PREG_PATTERN_ORDER</code></strong>。
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">offset</code></dt>

     <dd>

      <p class="para">
      通常， 查找时从目标字符串的开始位置开始。可选参数<code class="parameter">offset</code>用于
      从目标字符串中指定位置开始搜索(单位是字节)。
      </p>
      <blockquote class="note"><p><strong class="note">Note</strong>: 
       <p class="para">
       使用 <code class="parameter">offset</code> 参数不同于传递 <em>substr($subject, $offset)</em> 的
       结果到 <span class="function"><strong>preg_match_all()</strong></span> 作为目标字符串，因为 <code class="parameter">pattern</code>
        可以包含断言比如<em class="emphasis">^</em>， <em class="emphasis">$</em> 或者 <em class="emphasis">(?&lt;=x) </em>。
       示例查看 <span class="function"><a href="preg_match.html" class="function">preg_match()</a></span>。
       </p>
      </p></blockquote>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.preg-match-all-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
  返回完整匹配次数（可能是0），或者如果发生错误返回<strong><code>FALSE</code></strong>。
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.preg-match-all-changelog">
  <h3 class="title">更新日志</h3>
  <p class="para">
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>版本</th>
       <th>说明</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>5.4.0</td>
       <td>
        参数<code class="parameter">matches</code>成为可选的。
       </td>
      </tr>

      <tr>
       <td>5.3.6</td>
       <td>
        如果 <code class="parameter">offset</code>
        大于
        <code class="parameter">subject</code> 的程度，将返回 <strong><code>FALSE</code></strong>。
       </td>
      </tr>

      <tr>
       <td>5.2.2</td>
       <td>
       子命名分组语法可以接受<em>(?&lt;name&gt;)</em>，<em>(?&#039;name&#039;)</em>以及
       <em>(?P&lt;name&gt;)</em>了。 之前版本仅接受<em>(?P&lt;name&gt;)</em>方式。
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.preg-match-all-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-5859">
    <p><strong>Example #1 查找所有文本中的电话号码。</strong></p>
    <div class="example-contents">
<div class="phpcode"><pre><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />preg_match_all</span><span style="color: #007700">(</span><span style="color: #DD0000">"/\(?&nbsp;&nbsp;(\d{3})?&nbsp;&nbsp;\)?&nbsp;&nbsp;(?(1)&nbsp;&nbsp;[\-\s]&nbsp;)&nbsp;\d{3}-\d{4}/x"</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">"Call&nbsp;555-1212&nbsp;or&nbsp;1-800-555-1212"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$phones</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</pre></div>
    </div>

   </div>
  </p>
  <p class="para">
   <div class="example" id="example-5860">
    <p><strong>Example #2 查找匹配的HTML标签（贪婪）</strong></p>
    <div class="example-contents">
<div class="phpcode"><pre><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">//\\2是一个后向引用的示例.&nbsp;这会告诉pcre它必须匹配正则表达式中第二个圆括号(这里是([\w]+))<br />//匹配到的结果.&nbsp;这里使用两个反斜线是因为这里使用了双引号.<br /></span><span style="color: #0000BB">$html&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"&lt;b&gt;bold&nbsp;text&lt;/b&gt;&lt;a&nbsp;href=howdy.html&gt;click&nbsp;me&lt;/a&gt;"</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">preg_match_all</span><span style="color: #007700">(</span><span style="color: #DD0000">"/(&lt;([\w]+)[^&gt;]*&gt;)(.*?)(&lt;\/\\2&gt;)/"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$html</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$matches</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">PREG_SET_ORDER</span><span style="color: #007700">);<br /><br />foreach&nbsp;(</span><span style="color: #0000BB">$matches&nbsp;</span><span style="color: #007700">as&nbsp;</span><span style="color: #0000BB">$val</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"matched:&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">$val</span><span style="color: #007700">[</span><span style="color: #0000BB">0</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"part&nbsp;1:&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">$val</span><span style="color: #007700">[</span><span style="color: #0000BB">1</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"part&nbsp;2:&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">$val</span><span style="color: #007700">[</span><span style="color: #0000BB">2</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"part&nbsp;3:&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">$val</span><span style="color: #007700">[</span><span style="color: #0000BB">3</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"part&nbsp;4:&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">$val</span><span style="color: #007700">[</span><span style="color: #0000BB">4</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n\n"</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</pre></div>
    </div>

    <div class="example-contents"><p>以上例程会输出：</p></div>
    <div class="example-contents screen">
<div class="cdata"><pre>
matched: &lt;b&gt;bold text&lt;/b&gt;
part 1: &lt;b&gt;
part 2: b
part 3: bold text
part 4: &lt;/b&gt;

matched: &lt;a href=howdy.html&gt;click me&lt;/a&gt;
part 1: &lt;a href=howdy.html&gt;
part 2: a
part 3: click me
part 4: &lt;/a&gt;
</pre></div>
    </div>
   </div>
  </p>
  <p class="para">
   <div class="example" id="example-5861">
    <p><strong>Example #3 使用子命名组</strong></p>
    <div class="example-contents">
<div class="phpcode"><pre><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /><br />$str&nbsp;</span><span style="color: #007700">=&nbsp;&lt;&lt;&lt;FOO<br /></span><span style="color: #DD0000">a:&nbsp;1<br />b:&nbsp;2<br />c:&nbsp;3<br /></span><span style="color: #007700">FOO;<br /><br /></span><span style="color: #0000BB">preg_match_all</span><span style="color: #007700">(</span><span style="color: #DD0000">'/(?P&lt;name&gt;\w+):&nbsp;(?P&lt;digit&gt;\d+)/'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$str</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$matches</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">/*&nbsp;下面代码在php&nbsp;5.2.2(pcre&nbsp;7.0)或更高版本下工作,&nbsp;不过,&nbsp;为了向后兼容<br />&nbsp;*&nbsp;推荐使用上面的方式.&nbsp;*/<br />//&nbsp;preg_match_all('/(?&lt;name&gt;\w+):&nbsp;(?&lt;digit&gt;\d+)/',&nbsp;$str,&nbsp;$matches);<br /><br /></span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">$matches</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</pre></div>
    </div>

    <div class="example-contents"><p>以上例程会输出：</p></div>
    <div class="example-contents screen">
<div class="cdata"><pre>
Array
(
    [0] =&gt; Array
        (
            [0] =&gt; a: 1
            [1] =&gt; b: 2
            [2] =&gt; c: 3
        )

    [name] =&gt; Array
        (
            [0] =&gt; a
            [1] =&gt; b
            [2] =&gt; c
        )

    [1] =&gt; Array
        (
            [0] =&gt; a
            [1] =&gt; b
            [2] =&gt; c
        )

    [digit] =&gt; Array
        (
            [0] =&gt; 1
            [1] =&gt; 2
            [2] =&gt; 3
        )

    [2] =&gt; Array
        (
            [0] =&gt; 1
            [1] =&gt; 2
            [2] =&gt; 3
        )

)
</pre></div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.preg-match-all-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><a href="pcre.pattern.html" class="link">PCRE 匹配</a></li>
    <li class="member"><span class="function"><a href="preg_quote.html" class="function" rel="rdfs-seeAlso">preg_quote()</a> - 转义正则表达式字符</span></li>
    <li class="member"><span class="function"><a href="preg_match.html" class="function" rel="rdfs-seeAlso">preg_match()</a> - 执行匹配正则表达式</span></li>
    <li class="member"><span class="function"><a href="preg_replace.html" class="function" rel="rdfs-seeAlso">preg_replace()</a> - 执行一个正则表达式的搜索和替换</span></li>
    <li class="member"><span class="function"><a href="preg_split.html" class="function" rel="rdfs-seeAlso">preg_split()</a> - 通过一个正则表达式分隔字符串</span></li>
    <li class="member"><span class="function"><a href="preg_last_error.html" class="function" rel="rdfs-seeAlso">preg_last_error()</a> - 返回最后一个PCRE正则执行产生的错误代码</span></li>
   </ul>
  </p>
 </div>


</div></div></div></body></html>